# 构造函数
def judgment_triangle(input_number1,input_number2,input_number3):
    # 格式转化
    num1 = int(input_number1)
    num2 = int(input_number2)
    num3 = int(input_number3)
    # 判断是否为三角形
    if num1 >= 0 and num2 >=0 and num3 >=0:
        if ((num1+num2>num3)and(num1-num2<num3))and((num1+num3>num2)and(num1-num3<num2))and((num2+num3>num1)and(num2-num3<num1)):
            print(f"三边为{input_number1},{input_number2},{input_number3}可以构成三角形")
        else:
            print(f"三边为{input_number1},{input_number2},{input_number3}不可以构成三角形")
    else:
        print("数据输入错误")
    # 输出结果
    return print
    
input_number1 = int(input("请输入第一个数:"))
input_number2 = int(input("请输入第二个数:"))
input_number3 = int(input("请输入第三个数:"))

result = judgment_triangle(input_number1,input_number2,input_number3)
print(result)
